The Code for getting html

Name:

$(document).ready(function(){ $("button").click(function(){ alert("Value: " + $("#test").val()); }); });

This gets the name put into the input field and writes it to an alert.


The Code for Getting an Attribute

Mercer's Site

$(document).ready(function(){ $("#button2").click(function(){ alert("Href: " + $("#mercerlink").attr("href")); }); });

This gets the href from the a tag with the id "mercerlink" and writes it to an alert.


The Code for Setting an HTML Element

$("#buttonA").click(function(){ $("#test").val("President Underwood"); });

This sets the value of the input field to President Underwood.

The set href button changes the href of the a tag from https://www.mercer.edu to https://www.blackhawk.cs.mercer.edu


Getting and Setting CSS!

This is some cool stuff right here

Like, really cool, important stuff.